<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition>
	<p>The <b>rich:fileUpload</b> component allows you to upload files from the users
	machine to the server with various options.</p>
	<p>This example allows you to upload files to the demo server. The number of 
	files allowed at once is managed with the <b>maxFilesQuantity</b> attribute. 
	Every uploaded file will be processed with a <b>fileUploadListener</b> which 
	is called after every single file upload operation is finished.</p>
	<fieldset><legend><b>Example limitations</b></legend>This
	example allows you to upload <b>up to 5 files</b>. The file extension is
	limited to <b>GIF, JPG, BMP, PNG</b> and the maximum size of each file
	must not exceed 100kB</fieldset>
	<ui:include src="#{demoNavigator.sampleIncludeURI}" />
	<ui:include src="/templates/includes/source-view.xhtml">
		<ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
		<ui:param name="sourceType" value="xhtml" />
		<ui:param name="openLabel" value="View Source" />
		<ui:param name="hideLabel" value="Hide Source" />
	</ui:include>
	<ui:include src="/templates/includes/source-view.xhtml">
		<ui:param name="src" value="/WEB-INF/src/org/richfaces/demo/fileupload/FileUploadBean.java"/>
		<ui:param name="sourceType" value="java" />
		<ui:param name="openLabel" value="View FileUploadBean.java" />
		<ui:param name="hideLabel" value="Hide FileUploadBean.java" />
	</ui:include>
	<p><b>FileUpload requires two context-parameter's to be set in
	web.xml:</b></p>
	<ul>
		<li><b>createTempFiles</b> boolean attribute which defines whether the
		uploaded files are stored in temporary files or available in the listener
		directly as byte[] data (false for this example).</li>
		<li><b>maxRequestSize</b> attribute defines max size in bytes of the
		uploaded files (<i>1000000 for this example</i>).</li>
	</ul>
</ui:composition>

</html>